#include <cstdio>

#include "Viewer.h"

int main(int argc, char **argv)
{
	double timeStep;
	double grav;
	int cnt;
	if(argc == 1) {
		timeStep = 0.015;
		grav = -9.81;
		cnt = 3;
	} else if (argc = 2) {
		sscanf(argv[1], "%d", &cnt);
	} else if(argc == 4) {
		sscanf(argv[1], "%lf", &timeStep);
		sscanf(argv[2], "%lf", &grav);
		sscanf(argv[3], "%d", &cnt);
	} else {
		fprintf(stderr, "Usage: 06-Bridge timeStep grav numIter\n");
		exit(1);
	}

	glutInit(&argc, argv);
	Viewer viewer("06-Bridge", 700, 700, timeStep, grav, cnt);
	glutMainLoop();

	return 0;
}
